from gamebox.decorators import token_auth_required, permission_verify
from gamebox.services.user_service import UserService
from gamebox import response, errorcodes

_service = UserService()

@token_auth_required
@permission_verify('admin')
def add_user(user):
    try:
        _service.add_user(user)
        return response.result()
    except Exception as e:
        return response.result(errorcodes.UNKNOWN_ERROR)


@token_auth_required
@permission_verify('admin')
def update_user():
    pass


@token_auth_required
@permission_verify('admin')
def delete_user():
    pass
